package com.beidouapp.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.beidouapp.domain.example.RoleAndResourceExample;
import com.beidouapp.domain.pojo.Resource;
import com.beidouapp.domain.pojo.RoleAndResource;
import org.springframework.stereotype.Repository;

public interface RoleAndResourceMapper {
    int countByExample(RoleAndResourceExample example);

    int deleteByExample(RoleAndResourceExample example);

    int insert(RoleAndResource record);

    int insertSelective(RoleAndResource record);

    List<RoleAndResource> selectByExample(RoleAndResourceExample example);

    int updateByExampleSelective(@Param("record") RoleAndResource record, @Param("example") RoleAndResourceExample example);

    int updateByExample(@Param("record") RoleAndResource record, @Param("example") RoleAndResourceExample example);

    /**
     * 根据角色ID获取资源列表
     *
     * @param roleId
     * @return
     */
    public List<Resource> findRoleResourcesByRoleId(@Param("roleId") Integer roleId);
}